package day07;
/*
* @Author :lcy
* @Description :生成6个1~33之间的随机整数,添加到集合,并遍历
* @Date 2021/11/30 22:16
*/

import java.util.ArrayList;
import java.util.Random;

public class Test01_ArrayList {
    public static void main(String[] args) {
        //创建Random对象
        Random random=new Random();

        ArrayList<Integer> list=new ArrayList<>();

        for (int i = 0; i <6 ; i++) {
            int r =random.nextInt(33)+1;
            list.add(r);
        }
        System.out.println(list);
    }
}
